package express.check;

import java.util.Objects;

/**
 * 单词分析实体类
 *
 * @author miweidong
 */
public class Words {
    /**
     * 符号 （、）、+、—、*、/、.
     */
    private String label;
    /**
     * 标识符 +:1; -:2; *:3; /:4; （:5; ）:6
     */
    private Integer symbol;

    public Words() {
    }

    public Words(String label, Integer symbol) {
        this.label = label;
        this.symbol = symbol;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Integer getSymbol() {
        return symbol;
    }

    public void setSymbol(Integer symbol) {
        this.symbol = symbol;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Words words = (Words) o;
        return Objects.equals(label, words.label) &&
                Objects.equals(symbol, words.symbol);
    }

    @Override
    public int hashCode() {
        return Objects.hash(label, symbol);
    }

    @Override
    public String toString() {
        return "Words{" +
                "label='" + label + '\'' +
                ", symbol=" + symbol +
                '}';
    }
}
